package com.niren.relay.common.dt;

import java.util.Date;

public class DateTime {
    /**
     * 计算两时间间隔的秒数
     * */
    public static int calcTimeSecInterval(Date startDate, Date endDate){
        return (int)((endDate.getTime() - startDate.getTime())/1000);
    }

    /**
     * 计算两时间间隔的毫秒数
     * */
    public static int calcTimeMsecInterval(Date startDate, Date endDate){
        return (int)(endDate.getTime() - startDate.getTime());
    }


}
